home *** CD-ROM | disk | FTP | other *** search
/ Logiciels PC Special 3 / Logiciel PC - Hors-Serie 3.iso / Logs / consoles / neogeo / kbmamea9 / driver.txt < prev    next >
Text File  |  1999-04-13  |  6KB  |  156 lines

  1. Addng Support for New/Modified ROMs Using Neogeo.drv
  2.  
  3. The file format for Neogeo.drv is straightforward.
  4.  
  5. Ex.
  6.  
  7. [kof98]
  8. King of Fighters '98
  9. noclone
  10. 1998
  11. SNK
  12. MVS
  13. 20
  14. ROM_REGION 0x500000
  15. ROM_LOAD_WIDE_SWAP kof98_p1.rom 0x000000 0x100000 0x61ac868a 
  16. ROM_LOAD_WIDE_SWAP kof98_p2.rom 0x100000 0x400000 0x980aba4c 
  17. NEO_SFIX_128K kof98_s1.rom 0x7f7b4805 
  18. ROM_REGION 0x2000000
  19. ROM_LOAD kof98_c1.rom 0x0000000 0x800000 0xe564ecd6  
  20. ROM_LOAD kof98_c3.rom 0x0800000 0x800000 0x22127b4f  
  21. ROM_LOAD kof98_c5.rom 0x1000000 0x800000 0x9d10bed3  
  22. ROM_LOAD kof98_c7.rom 0x1800000 0x800000 0xf6d7a38a  
  23. ROM_REGION 0x2000000
  24. ROM_LOAD kof98_c2.rom 0x0000000 0x800000 0xbd959b60  
  25. ROM_LOAD kof98_c4.rom 0x0800000 0x800000 0x0b4fa044  
  26. ROM_LOAD kof98_c6.rom 0x1000000 0x800000 0xda07b6a2  
  27. ROM_LOAD kof98_c8.rom 0x1800000 0x800000 0xc823e045  
  28. NEO_BIOS_SOUND_256K kof98_m1.rom 0x4e7a6b1b 
  29. ROM_REGION_OPTIONAL 0x1000000
  30. ROM_LOAD kof98_v1.rom 0x000000 0x400000 0xb9ea8051 
  31. ROM_LOAD kof98_v2.rom 0x400000 0x400000 0xcc11106e 
  32. ROM_LOAD kof98_v3.rom 0x800000 0x400000 0x044ea4e1 
  33. ROM_LOAD kof98_v4.rom 0xc00000 0x400000 0x7985ea30 
  34.  
  35. Looks familiar? If you know how to add drivers to NeoMAME, it should.
  36. The name of the game (and the rom file) is in square brackets.
  37. The next four lines specify the game description,year of release, 
  38. game manufacturer, and ROM image type (MVS or MGD2). 
  39.  
  40. The number on the next line specfies how many lines of driver data follow.
  41. This means that there are 20 lines from ROM_REGION 0x500000 to 
  42. ROM_LOAD kof98_v4.rom 0xc00000 0x400000 0x7985ea30. 
  43.  
  44. The next section, is pretty much the same as MAME's driver macros,
  45. except for the fact that there are no parentheses, commas, comments, or
  46. quotation marks.
  47.  
  48. The supported driver-definition macros are :
  49.  
  50. ROM_REGION
  51. ROM_REGION_DISPOSE
  52. ROM_REGION_OPTIONAL
  53. ROM_LOAD
  54. ROM_CONTINUE
  55. ROM_RELOAD
  56. ROM_LOAD_WIDE
  57. ROM_LOAD_WIDE_SWAP
  58. ROM_LOAD_EVEN
  59. ROM_LOAD_ODD
  60. NEO_BIOS_SOUND_256K
  61. NEO_BIOS_SOUND_128K
  62. NEO_BIOS_SOUND_64K
  63. NEO_SFIX_128K
  64. NEO_SFIX_64K
  65. NEO_SFIX_32K
  66.  
  67. Notes : the parser is a bit unforgiving. no blank lines allowed, except between 
  68. game drivers. No comments, too. Numbers are hexadecimal only. Oh, and don't make 
  69. your strings too long. It's quite easy to crash KBMAME if there's an error in 
  70. the driver file. Noclone means an entire driver is in the file. IF a clone is specfied,
  71. ex. clone wakuwak7, the old driver will be used (useful for changing just checksums).
  72.  
  73. Basically, to port an existing driver from the MAME source for modification, you do
  74. this (more or less) :
  75.  
  76. 1) add a new header [gamename] in neogeo.drv.
  77. 2) specify if it is a clone (uses an existng driver) or not
  78. 3) add the description,year,manufacturer in next 3 lines
  79. 4) place MVS or MGD2 on the next line
  80. 5) leave a blank line (to be filled later)
  81. 6) copy and paste the driver definition from the MAME source
  82.    (everything between ROM_START and ROM_END)
  83. 7) remove all comments
  84. 8) search and replace the ff: (replace with blanks)
  85.     a) "
  86.     b) ,
  87.     c) (
  88.     d) )
  89.    No, do not search and replace the ENTIRE file. Just the macros ;)
  90.    
  91. 8) evaluate all expressions like (0x20000 | ROM_FLAG_WIDE | ROM_FLAG_SWAP)
  92.    and 0x0000 & ~1 and replace them with equivalents.
  93.  
  94.    For an example of this, compare the shocktro & aof entries in the sample
  95.    neogeo.drv file to the MAME source.
  96.  
  97. 9) count all the entries (lines) from the first MACRO (not header) to the last
  98.    and place the number on the blank line in step 4.
  99.  
  100. To use the driver in the neogeo.drv file, use the commandline
  101.  
  102. KBMAMEA nameofgame -newdrv
  103.         -or-
  104. KBMAMEC nameofgame -newdrv
  105.  
  106. If MAME already supports the specified game, any settings for the same game 
  107. in neogeo.drv will override MAME's settings if the -newdrv parameter is used.
  108.  
  109.  
  110. **** NEW ****
  111.  
  112. To just change checksums in an existing driver file without having to write another driver, 
  113. use this format :
  114.  
  115. [wakuwak7]
  116. clone  wakuwak7
  117. Waku Waku 7
  118. 199x
  119. SNK
  120. MVS
  121. 0
  122. waku7_v1.rom 0x75bbd358
  123. waku7_v2.rom 0x4c568c78
  124. -1
  125.  
  126. Since an existing driver will be used, that driver is specified (wakuwak7). Since there
  127. is no driver definition here, the line specifying the number of macros in the driver definition 
  128. is zero. From this point on is a list of filenames and checksums to change in the existing driver,
  129. in this (hypothetical) example, two sound roms for Waku Waku 7. After all the files have been 
  130. listed, the entry shows -1 to indicate the end of the list.
  131.  
  132. Additionally, support for MAME's SRAM hacks now exists. As the last line of the driver definition,
  133. create an entry like this :
  134.  
  135. SRAMHACK 0x100
  136.  
  137. where 0x100 is the address to watch. If you do not understand what I mean, you are better off
  138. leaving this one alone!
  139.  
  140. Note : If the SRAM hack doesn't seem to work, delete the game's .hi file and run KBMAME again.
  141.  
  142. **** NEW (3/6/98) ****
  143.  
  144. The -newdrv parameter has been removed.  Now, KBMAME will check the neogeo.drv file FIRST. If
  145. it finds a driver for  the specified game there, it overrides the default driver automatically.
  146. This is really useful for those checksum changes (no need to type -newdrv to get rid of the checksum
  147. error). 
  148.  
  149. To force KBMAME to use the existing driver instead of the one in neogeo.drv,  use the -olddrv parameter.
  150.  
  151. **** NEW (4/13/99) ****
  152.  
  153. In addition to MVS and MGD2, the dynamic driver now has a RASTER option for those
  154. games which need the MVS Raster driver. Usage : just like the previous ones :)
  155.  
  156. - Deimos (http://members.xoom.com/Deimos0)